// 首页项目推荐
<template>
    <div id='home-project-container'>
        <h2 style="font-weight: normal">项目推荐</h2>
        <Divider />
        <div v-if="homeProjects.length != 0">
            <router-link :to="`/project/info/${project.id}`" class="home-project" v-for="(project, pidx) in homeProjects" :key="`home-project-${pidx}`">
                <div class="home-project-box">
                    <h3 class="home-project-name">{{ project.name }}</h3>
                    <div class="home-project-summary">{{ project.summary }}</div>
                    <div style="text-align: right">{{ project.pubDate }}</div>
                </div>
            </router-link>
        </div>
        <div v-else>
            <div class="home-project-placeholder" v-for="num in 10" :key="`home-project-placeholder-${num}`" />
        </div>
    </div>
</template>

<script lang='ts'>
import { HomeProjectsView } from "./Index";
export default HomeProjectsView;
</script>

<style lang='scss' scoped>
@import './Index.scss'
</style>